package com.dkd.sbtz.domain.ordervo;

import com.dkd.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

import com.dkd.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class OrderFullExportVo {
    @Excel(name = "工单ID")      private Long id;
    @Excel(name = "工单编号")     private String woCode;
    @Excel(name = "工单标题")     private String title;
    @Excel(name = "工单类型")     private String orderType;
    @Excel(name = "紧急程度")     private Integer urgency;

    // —— 设备（node 拍扁）——
    @Excel(name = "设备名称")     private String equipmentName;
    @Excel(name = "设备编码")     private String equipmentCode;
    @Excel(name = "设备型号")     private String equipmentModel;
    @Excel(name = "设备规格")     private String equipmentSpec;
    @Excel(name = "设备品牌")     private String equipmentBrand;

    @Excel(name = "工单状态")     private String status;
    @Excel(name = "工单来源")     private String source;
    @Excel(name = "报修人")       private String requesterId;
    @Excel(name = "派单人")       private String dispatcherId;
    @Excel(name = "接修人")       private String receiverId;

    @Excel(name = "故障/需求描述", width = 60) private String faultDesc;

//    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "需求报送时间", width = 20, dateFormat = "yyyy-MM-dd")
//    private Date submitTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime submitTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "工单创建时间", width = 20, dateFormat = "yyyy-MM-dd")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划开始时间", width = 20, dateFormat = "yyyy-MM-dd")
    private Date planStartTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划完成时间", width = 20, dateFormat = "yyyy-MM-dd")
    private Date planEndTime;

//    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "实际开始时间", width = 20, dateFormat = "yyyy-MM-dd")
//    private Date actualStartTime;
//
//    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "实际完成时间", width = 20, dateFormat = "yyyy-MM-dd")
//    private Date actualEndTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime actualStartTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime actualEndTime;


    @Excel(name = "优先级")      private Long priorityScore;

    // —— 一对多汇总列 ——
    @Excel(name = "附件名称", width = 60) private String attachmentNames; // a.jpg; 报告.pdf
    @Excel(name = "附件链接", width = 120) private String attachmentUrls;  // 绝对URL; 分号分隔
    @Excel(name = "备件明细", width = 60) private String spareDetail;     // SP001*2(齿轮); ...
}


